package com.sgb.kjwl.view.widget;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.AlbumEntity;
import com.sgb.kjwl.view.ui.activity.self.publish.GoodsAlbumActivity;
import com.sgb.kjwl.view.ui.adapter.material.SelectAlbumAdapter;
import com.swgk.core.dialog.BasePopWindow;
import com.swgk.core.dialog.PopViewHolder;
import com.swgk.core.recyclerview.adapter.AdapterOnItemClick;

import java.util.List;

public class SelectAlbumPopWindow2 extends BasePopWindow<String> {
    private TextView tvCancel;
    private TextView tv_pic,tv_video;

    public SelectAlbumPopWindow2(Context context) {
        super(context, DIR_DOWN_UP);
    }

    @Override
    protected int popLayout() {
        return R.layout.popwindow_select_album2;
    }

    @Override
    protected void initView(PopViewHolder holder) {
        tvCancel = holder.getPop().findViewById(R.id.tv_cancel);
        tv_pic = holder.getPop().findViewById(R.id.tv_pic);
        tv_video = holder.getPop().findViewById(R.id.tv_video);
        tv_pic.setOnClickListener(v -> {
            onResultClick.result(1, null, null);
            dismiss();
        });
        tv_video.setOnClickListener(v -> {
            onResultClick.result(2, null, null);
            dismiss();
        });
        tvCancel.setOnClickListener(v -> {
            dismiss();
        });
    }


}
